import { reqsecklist } from "../../http/api"

let state = {
    arr:[]
}
let getters = {
    arr({arr}){
        return arr
    }
}
let mutations = {
    changeArr(state,arr){
        state.arr = arr
    }
}
let actions = {
    reqArr(context){
        reqsecklist().then(res=>{
            if(res.data.code===200){
                context.commit("changeArr",res.data.list)
            }
        })
    }
}

export default  {
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}